Skip to content

#210 - Add CalVer version surfaces#212

Merged
cliffburdick merged 1 commit into
mainfrom
cburdick/calver-version-surfaces
Jul 1, 2026
Merged

#210 - Add CalVer version surfaces#212
cliffburdick merged 1 commit into
mainfrom
cburdick/calver-version-surfaces

Conversation

@cliffburdick

Copy link
Copy Markdown
Collaborator

Add CalVer versioning with gettable interfaces.

Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces CalVer (YYYY.MM.PATCH) versioning for DAQIRI. The version is read from a new top-level VERSION file, validated by a CMake regex, used to configure daqiri/version.h, and surfaced through C++ macros/inline helpers and Python module attributes.

  • Build system: CMakeLists.txt reads VERSION, generates cmake/daqiri_version.h.indaqiri/version.h, sets VERSION/SOVERSION on shared library targets, and switches write_basic_package_version_file to AnyNewerVersion to decouple CalVer year from ABI compatibility (ABI is separately tracked via DAQIRI_ABI_VERSION/SOVERSION).
  • C++ API: daqiri/daqiri.h now includes daqiri/version.h, exposing DAQIRI_VERSION, component macros, DAQIRI_ABI_VERSION, and daqiri::version_string() / daqiri::abi_version() inline helpers; src/metrics.cpp replaces the hardcoded "0.1.0" meter version with version_string().
  • Python API: pybind11 bindings expose __version__, __version_info__, __abi_version__, the DAQIRI_VERSION* constants, and matching functions; __init__.py re-exports the dunder attributes explicitly since wildcard import skips them on C extensions.

Confidence Score: 5/5

Safe to merge — the changes are additive, touch no packet I/O paths, and are well-contained to version metadata plumbing.

The PR is narrowly scoped to version metadata: a new VERSION file, a generated header, build system wiring, Python bindings, and matching doc updates. No BurstParams paths, engine vtable, or engine selection logic is touched. The unqualified version_string() call in daqiri::metrics resolves correctly to daqiri::version_string() via C++ enclosing-namespace lookup. DCO trailer is present and all relevant doc targets are updated in the same PR.

No files require special attention.

Important Files Changed

Filename Overview
CMakeLists.txt Reads CalVer version from VERSION file with a regex guard, configures daqiri_version.h.in, and changes CMake package compatibility from SameMajorVersion to AnyNewerVersion to decouple year-based CalVer from ABI versioning (tracked separately via SOVERSION).
cmake/daqiri_version.h.in New CMake-configured header exposing DAQIRI_VERSION macro, CalVer component macros, DAQIRI_ABI_VERSION, and inline constexpr helpers in the daqiri namespace — clean, header-only, noexcept.
src/metrics.cpp Replaces hardcoded "0.1.0" with version_string() for the OTel meter version; unqualified call resolves correctly to daqiri::version_string() via C++ enclosing-namespace lookup from daqiri::metrics.
python/daqiri_common_pybind.cpp Exposes version, version_info, abi_version module attributes plus version_string/year/month/patch/abi_version functions via pybind11; correctly bridges the C++ constexpr values to Python.
python/pybind11/init.py Re-exports version, version_info, and abi_version explicitly — necessary because wildcard import skips dunder attributes from C extensions.
src/CMakeLists.txt Threads DAQIRI_GENERATED_INCLUDE_DIR into daqiri_common and per-engine include paths, and sets VERSION/SOVERSION on the shared library targets — correctly decouples CalVer from ABI version.
include/daqiri/daqiri.h Single-line addition including daqiri/version.h, making version macros and helpers available to any consumer of the public header.
VERSION New single-line file containing 2026.7.0; correctly formatted CalVer that passes the CMake regex validator.
docs/api-reference/cpp.md Adds a Version Metadata section with usage examples and table entries for the new version/abi functions — complete and accurate.
docs/api-reference/python.md Documents daqiri.version, version_info, abi_version, and version helper functions with a working code example; table entries for the new constants are added.
docs/getting-started.md Adds CalVer find_package usage example, pkg-config modversion command, and a note on daqiri/version.h — matches the new CMake and header behavior.
AGENTS.md Adds CalVer description to CMake options section and public API section; removes stale :137 line-number anchor from the docs drift hotspot list.

Reviews (2): Last reviewed commit: "#210 - Add CalVer version surfaces" | Re-trigger Greptile

@RamyaGuru

Copy link
Copy Markdown
Collaborator

I agree with the Greptile suggestion to make the first version 2026.07.0 to match the YYYY.MM.PATCH template. Otherwise, looks good to me!

@cliffburdick

Copy link
Copy Markdown
Collaborator Author

@greptile review

@cliffburdick cliffburdick merged commit c6914b1 into main Jul 1, 2026
3 checks passed
@cliffburdick cliffburdick deleted the cburdick/calver-version-surfaces branch July 1, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants